<?php
require(dirname(__FILE__)."/includes/init.php");

$sql = "select id,title from tempTemplate";
$result = $GLOBALS['db']->dbfetchAll($sql);
foreach($result as $key=>$value){
    if(empty($value['title'])){
		$sql = "delete from tempTemplate where id = ".$value['id']."";
		$GLOBALS['db']->dbquery($sql);
	}
}